package cn.ulyer.core.secure.service;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;

import javax.servlet.http.HttpServletRequest;

/**
* @author: ulyer
* @Date: 2021/8/11
* @Description: token存储管理 认证信息存储管理
*/
public interface TokenService {

    Object store(Object token, Authentication authentication);

    Object generatorToken(HttpServletRequest request);

    Object readToken(HttpServletRequest request);

    Authentication authenticate(Object token) throws AuthenticationException;

    void remove(String token);
}
